package com.ydd.mapper;

import com.ydd.entity.SysRole;
import com.ydd.entity.SysRoleMenu;
import com.ydd.vo.SysRoleVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import java.util.List;

/**
 * 角色表(SysRole)表数据库访问层
 *
 * @author makejava
 * @since 2023-04-29 12:08:38
 */
@Mapper
public interface SysRoleMapper extends BaseMapper<SysRoleMenu>{

    @Select("select name from sys_role where id=#{roleId}")
    String getRoleNameById(String roleId);

    /**
     * 根据name分页查询
     * @return
     */
    List<SysRoleVO> findPageByName(String name);
}

